package com.house.reportisy;

import com.house.entity.City;
import com.house.vo.CityVO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * @Author OhygC
 * @since 1.0
 */
@Repository
public interface CityRepository extends JpaRepository<City,Integer>, JpaSpecificationExecutor<City> {
        int countByDelFlagIs(Integer delFalg);

        @Query(value = "select id,name from city where del_flag=?",nativeQuery = true)
        List<Map<String, CityVO>> findCitys(Integer delFalg);
}
